package com.xinyu.cli.pattern;

/**
 * 调用者设备
 *
 * @author: Wuxinyu
 * @date: 2024/5/19-05-19-15:54
 * @description: com.xinyu.cli.pattern
 * @version: 1.0
 */
public class RemoteControl {
    private Command command;

    public void setCommand(Command command) {
        this.command = command;
    }

    public void pressButton() {
        // 按下按钮，执行命令
        command.execute();
    }
}
